package controllerInterfaces;

import java.util.List;

import javax.swing.JPanel;

import model.Project;
import modelInterfaces.IProject;
import pluginInterfaces.IMetric;
import utils.weka.view.GenericObjectEditor;
import view.ViewMetricsPanel;
import viewInterfaces.IViewTestsPanel;
import controller.ControllerMain;
import controller.ControllerMetricsPanel;

/**
*
* Interface of {@link ControllerMetricsPanel} controller class according to Abstract Factory design pattern.
*/
public interface IControllerMetricsPanel{
		
	/**
	 * Set the MVC++ Main Class for this controller.</br>
	 * ControllerMain is manipulable through {@link IControllerMain} interface
	 * @param	controllerMain	MVC++ Main Controller
	 * @see	ControllerMain
	 * @see IControllerMain
	 */
	public void SetMainController(IControllerMain controllerMain);
	
	
	/**
	 * Get the list of {@link Metric} from {@link ControllerMain}.</br>
	 * Each of the obtained {@link MEtric} are manipulable through its {@link IMetric} interface.
	 * @return	list of metric configurations
	 * @see		ControllerMain
	 * @see		IControllerMain
	 */	
	public List<IMetric> getMetricList();
	
	
	/**
	 * Set the list of {@link Metric} from {@link ControllerMain}.</br>
	 * Each of the saved {@link Metric} are manipulable through its {@link IMetric} interface.
	 * @param	metricList	list of metric configurations
	 * @see		ControllerMain
	 * @see		IControllerMain
	 */	
	public void setMetricList(List<IMetric> metricList);
	
	
	/**
	 * Get the Panel of View
	 * @return Panel of Metrics
	 * @see ViewMetricsPanel
	 */	
	public JPanel getPanel();

	
	/**
	 * Start the metric setup for add a metric configuration ({@link Metric}) from Metrics Panel
	 * @see Metric
	 * @see IMetric
	 */		
	public void addMetricSetup();

	
	/**
	 * Remove the selected metric setup from Metrics Panel</br>
	 * @param	index	index of selected metric configuration
	 * @see 	Project
	 * @see		IProject
	 */		
	public void removeMetricSetup(int index);
	
	
	/**
	 * Start the metric setup for edit a selected metric configuration ({@link Metric}) from Metrics Panel
	 * @param	index	index of selected recommendation algorithm configuration
	 * @see		Metric
	 * @see		IMetric
	 */			
	public void copyMetricSetup(int index);
	
	
	/**
	 * Start the metric setup for edit a selected recommendation algorithm configuration ({@link Metric}) from Recommenders Panel
	 * @param	index	index of selected metric algorithm configuration
	 * @see		Metric
	 * @see		IMetric
	 */		
	public void editMetricSetup(int index);
	

	/**
	 * Add the metric setup ({@link Metric}) by using Weka object 
	 * @param	m_Object	Object generated by Weka
	 * @see		GenericObjectEditor
	 * @see 	Project
	 * @see		IProject
	 */		
	public void addMetric(Object m_Object);

	
	/**
	 * Add the edited metric setup ({@link Metric}) by using Weka object 
	 * @param	m_Object	Object generated by Weka
	 * @see		GenericObjectEditor
	 * @see 	Project
	 * @see		IProject
	 */			
	public void editMetric(Object m_Object);
	
	
	/**
	 * Block all visual components of panel
	 * @see ViewMetricsPanel
	 */
	public void blockAllComponents();
	
	
	/**
	 * UnBlock all visual components of panel
	 * @see ViewMetricsPanel
	 */	
	public void unBlockAllComponents();
	
	
	/**
	 * Get View of this controller</br>
	 * This method is only used for realize unit testing.
	 * @return IViewMetricsPanel
	 */
	public IViewTestsPanel GetView();
}
